import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export function createRouter (){
    const router = new Router({
        mode: 'history',
        routes: [{
            name: 'home',
            path: '/',
            component: () => import('@/pages/Home')
        }, {
            name: 'about',
            path: '/about',
            component: () => import('@/pages/About')
        }, {
            name: '404',
            path: '*',
            component: () => import('@/pages/404')
        }]
    })
    return router
}
